How to use - Methods

Calling a method without arguments

Always check the method if it requires arguments.

getComponent() method returns the script owner vcComponent.

import vcCore as vc

comp = vc.getComponent()

Calling a method with arguments

findBehavior() method returns the behavior that matches the name argument.

import vcCore as vc

comp = vc.getComponent()
sensor_signal = comp.findBehavior("SensorSignal")

Optional and keyword arguments

Some methods may have optional arguments which can be used but are not required by the function call. Methods may also have keyword arguments, for example, the waitTrigger used below. Note that, the waitTrigger is an optional keyword argument.

trig_signal = comp.findBehavior("TriggerSignal")
await trig_signal.waitFor(True)
# OR
await trig_signal.waitFor(True, waitTrigger = True)

Use simulation-time-consuming methods

For more information, see how to consume simulation time